Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix for local repo casing issue on Linux #1750

Merged
merged 7 commits into from
Dec 5, 2024
Merged

Conversation

anamnavi
Copy link
Member

@anamnavi anamnavi commented Nov 11, 2024

For the FindNameHelper() the regex was:
test_local_mod.\d+.\d+.\d+(?:[a-zA-Z0-9-.]+|.\d)?.nupkg

The first '.' matches any character whereas our intention with the regex is to match the literal '.' so I added a backslash before the '.' to escape it. If the package being searched for is test_local_mod it was matching test_local_mod.1.0.0.nupkg and also test_local_mod_2.1.0.0.nupkg where the '_' character was getting matched by '.' in regex
and 2.1.0.0 was getting considered as the version.

The main issue Amber had found was that for FindVersionHelper() the path for the .nupkg was being constructed and we use lowercasing so on Linux that path will not be correct. Instead, once we find a matching package (by name and version) we should use the path given from the file system that has the correct casing.

PR Summary

PR Context

PR Checklist

@anamnavi anamnavi changed the title change casing of tests Bugfix for local repo casing issue on Linux Nov 12, 2024
@alerickson
Copy link
Member

Other than the digit issue, everything else looks good.

@alerickson
Copy link
Member

Do we still need
Match match = matches[0]; on line 276
and
Capture group = groups[0]; on line 284?
Looks like both variables aren't being used anywhere

@anamnavi anamnavi merged commit 2ec92f2 into master Dec 5, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants